package com.superhelper.processor;

import java.io.IOException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 *
 */
public class App {
    private static final Logger log = LoggerFactory.getLogger(App.class);
    private static ClassPathXmlApplicationContext context;

    public static void main(String[] args) throws IOException, InterruptedException {
        initializeApplicationContext(new String[] { "classpath:/configs/app-context.xml" });
    }

    private static void initializeApplicationContext(String[] resource) throws InterruptedException {
        context = new ClassPathXmlApplicationContext(resource);
        context.start();
        log.info("superhelper processor start success..............");
        // MtOrderConsumer consumer = context.getBean(MtOrderConsumer.class);
        // TakeOutOrder order =
        // context.getBean(TakeOutOrderMapper.class).getById(660L);
        // consumer.addDeliverInfo(order);

        synchronized (App.class) {
            try {
                App.class.wait();
            } catch (InterruptedException e) {
            }
        }

    }
}
